home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4771 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: time spent on memory allocation
  5. Date: Tue, 06 Feb 96 20:17:55 GMT
  6. Organization: none
  7. Message-ID: <823637875snz@genesis.demon.co.uk>
  8. References: <4f68uj$nih@srvr1.engin.umich.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4f68uj$nih@srvr1.engin.umich.edu>
  15.            cjlin@news-server.engin.umich.edu "Chih-Jen Lin" writes:
  16.  
  17. >Dear friends :
  18. >
  19. >An advantage of pointer is it saves time to pass 
  20. >structure vraiables. However, to allocate and free
  21. >memory too frequently also takes a lot of time. Comparing to
  22. >a floating point operation, does this cost much or not ?
  23. >Hope you can give me some ideas.
  24.  
  25. On most systems a call to malloc is likely to be much more expensive than
  26. a floating point operation. What exactly do you have in mind?
  27.  
  28. -- 
  29. -----------------------------------------
  30. Lawrence Kirby | fred@genesis.demon.co.uk
  31. Wilts, England | 70734.126@compuserve.com
  32. -----------------------------------------
  33.